package com.zx.dsptuneup_cloud.Util;

import android.util.Log;
import android.widget.TextView;

import com.orhanobut.hawk.Hawk;
import com.zx.dsptuneup_cloud.App;
import com.zx.dsptuneup_cloud.Data_Bean.ChanelBean;
import com.zx.dsptuneup_cloud.Data_Bean.EqSegmentBean;
import com.zx.dsptuneup_cloud.Enum.MessageReceiveType;
import com.zx.dsptuneup_cloud.R;
import com.zx.dsptuneup_cloud.Tools.EventMessage;
import com.zx.dsptuneup_cloud.Tools.NumberBaseConversionUtil;

import org.greenrobot.eventbus.EventBus;

import java.util.ArrayList;

import butterknife.BindView;

/*
 *
 * tcp新协议字符串截取工具
 *
 **/
public class InterceptionStringUtil {
    public final String TAG = "InterceptionStringUtil";

    /*
     * 14通道数据
     *
     */
    public static void getData14Channel(String channel) {
        if(channel.length()<268){
            return;
        }
        int num = ByteToString.strTo10(channel.substring(32, 34));//通道编号
        Log.d("InterceptionStringUtil", num + "  " + App.getContext().getEqData().getInputChannelArr().size() + "  " + App.getContext().getEqData().getInputChannelArr().get(num).getEqSegArr().size());
        ChanelBean chanelBean = App.getContext().getEqData().getInputChannelArr().get(num);
        ArrayList<EqSegmentBean> eqSegArr = chanelBean.getEqSegArr();

        switch (num) {
            case 0:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 24, channel.length() - 22)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 22, channel.length() - 18)));//音量
                chanelBean.setHighCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 18, channel.length() - 14)));//高切
                chanelBean.setLowCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 10)));//
                Log.d("TAGevent回复静音=", channel.substring(channel.length() - 24, channel.length() - 22) + "   " + chanelBean.isMute());
                //  Log.d("fdggdgs22",NumberBaseConversionUtil.SixToDecimalTen(channel.substring(14*14+2, 14*14 + 4))+"  " +NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length()-22, channel.length()-18))+"   " +channel.substring(channel.length()-22, channel.length()-18));

                for (int i = 0; i < 15; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    //  eqSegmentBean.setGain(3.90);//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                    Log.d("hdjghjdghfj1", i + "   Type=" + eqSegmentBean.getType() + "  频率=" + eqSegmentBean.getEqSegName() + "  q值=" + eqSegmentBean.getQvalue() + "   增益=  " + eqSegmentBean.getGain());
                }
                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getInputChannelArr().remove(num);
                App.getContext().getEqData().getInputChannelArr().add(num, chanelBean);
                break;
            case 1:

                chanelBean.setChanelNum(num);
                //  Log.d("InterceptionStringUtil",num+"");
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 24, channel.length() - 22)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 22, channel.length() - 18)));//音量
                chanelBean.setHighCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 18, channel.length() - 14)));//高切
                chanelBean.setLowCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 10)));//

                for (int i = 0; i < 15; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                    // chanelBean.getEqSegArr().add(eqSegmentBean);
                    Log.d("hdjghjdghfj2", i + "   Type=" + eqSegmentBean.getType() + "  频率=" + eqSegmentBean.getEqSegName() + "  q值=" + eqSegmentBean.getQvalue() + "   增益=  " + eqSegmentBean.getGain());
                }
                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getInputChannelArr().remove(num);
                App.getContext().getEqData().getInputChannelArr().add(num, chanelBean);

                break;
            case 2:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 24, channel.length() - 22)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 22, channel.length() - 18)));//音量
                chanelBean.setHighCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 18, channel.length() - 14)));//高切
                chanelBean.setLowCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 10)));//

                for (int i = 0; i < 15; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                    // chanelBean.getEqSegArr().add(eqSegmentBean);
                    Log.d("hdjghjdghfj3", i + "   Type=" + eqSegmentBean.getType() + "  频率=" + eqSegmentBean.getEqSegName() + "  q值=" + eqSegmentBean.getQvalue() + "   增益=  " + eqSegmentBean.getGain());
                }
                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getInputChannelArr().remove(num);
                App.getContext().getEqData().getInputChannelArr().add(num, chanelBean);
                break;
            case 3:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 24, channel.length() - 22)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 22, channel.length() - 18)));//音量
                chanelBean.setHighCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 18, channel.length() - 14)));//高切
                chanelBean.setLowCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 10)));//

                for (int i = 0; i < 15; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                    // chanelBean.getEqSegArr().add(eqSegmentBean);
                    Log.d("hdjghjdghfj4", i + "   Type=" + eqSegmentBean.getType() + "  频率=" + eqSegmentBean.getEqSegName() + "  q值=" + eqSegmentBean.getQvalue() + "   增益=  " + eqSegmentBean.getGain());
                }
                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getInputChannelArr().remove(num);
                App.getContext().getEqData().getInputChannelArr().add(num, chanelBean);
                break;
            case 4:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 24, channel.length() - 22)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 22, channel.length() - 18)));//音量
                chanelBean.setHighCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 18, channel.length() - 14)));//高切
                chanelBean.setLowCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 10)));//

                for (int i = 0; i < 15; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                    // chanelBean.getEqSegArr().add(eqSegmentBean);
                    Log.d("hdjghjdghfj5", i + "   Type=" + eqSegmentBean.getType() + "  频率=" + eqSegmentBean.getEqSegName() + "  q值=" + eqSegmentBean.getQvalue() + "   增益=  " + eqSegmentBean.getGain());
                }
                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getInputChannelArr().remove(num);
                App.getContext().getEqData().getInputChannelArr().add(num, chanelBean);
                break;
            case 5:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 24, channel.length() - 22)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 22, channel.length() - 18)));//音量
                chanelBean.setHighCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 18, channel.length() - 14)));//高切
                chanelBean.setLowCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 10)));//
                for (int i = 0; i < 15; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                    // chanelBean.getEqSegArr().add(eqSegmentBean);
                    Log.d("hdjghjdghfj6", i + "   Type=" + eqSegmentBean.getType() + "  频率=" + eqSegmentBean.getEqSegName() + "  q值=" + eqSegmentBean.getQvalue() + "   增益=  " + eqSegmentBean.getGain());
                }
                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getInputChannelArr().remove(num);
                App.getContext().getEqData().getInputChannelArr().add(num, chanelBean);
                break;
            case 6:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 24, channel.length() - 22)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 22, channel.length() - 18)));//音量
                chanelBean.setHighCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 18, channel.length() - 14)));//高切
                chanelBean.setLowCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 10)));//

                for (int i = 0; i < 15; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                    // chanelBean.getEqSegArr().add(eqSegmentBean);
                    Log.d("hdjghjdghfj7", i + "   Type=" + eqSegmentBean.getType() + "  频率=" + eqSegmentBean.getEqSegName() + "  q值=" + eqSegmentBean.getQvalue() + "   增益=  " + eqSegmentBean.getGain());
                }
                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getInputChannelArr().remove(num);
                App.getContext().getEqData().getInputChannelArr().add(num, chanelBean);
                break;
            case 7:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 24, channel.length() - 22)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 22, channel.length() - 18)));//音量
                chanelBean.setHighCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 18, channel.length() - 14)));//高切
                chanelBean.setLowCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 10)));//

                for (int i = 0; i < 15; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                    // chanelBean.getEqSegArr().add(eqSegmentBean);
                    Log.d("hdjghjdghfj8", i + "   Type=" + eqSegmentBean.getType() + "  频率=" + eqSegmentBean.getEqSegName() + "  q值=" + eqSegmentBean.getQvalue() + "   增益=  " + eqSegmentBean.getGain());
                }
                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getInputChannelArr().remove(num);
                App.getContext().getEqData().getInputChannelArr().add(num, chanelBean);
                break;
            case 8:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 24, channel.length() - 22)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 22, channel.length() - 18)));//音量
                chanelBean.setHighCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 18, channel.length() - 14)));//高切
                chanelBean.setLowCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 10)));//

                for (int i = 0; i < 15; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                    // chanelBean.getEqSegArr().add(eqSegmentBean);
                    Log.d("hdjghjdghfj9", i + "   Type=" + eqSegmentBean.getType() + "  频率=" + eqSegmentBean.getEqSegName() + "  q值=" + eqSegmentBean.getQvalue() + "   增益=  " + eqSegmentBean.getGain());
                }
                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getInputChannelArr().remove(num);
                App.getContext().getEqData().getInputChannelArr().add(num, chanelBean);
                break;
            case 9:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 24, channel.length() - 22)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 22, channel.length() - 18)));//音量
                chanelBean.setHighCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 18, channel.length() - 14)));//高切
                chanelBean.setLowCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 10)));//

                for (int i = 0; i < 15; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                    // chanelBean.getEqSegArr().add(eqSegmentBean);
                    Log.d("hdjghjdghfj10", i + "   Type=" + eqSegmentBean.getType() + "  频率=" + eqSegmentBean.getEqSegName() + "  q值=" + eqSegmentBean.getQvalue() + "   增益=  " + eqSegmentBean.getGain());
                }
                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getInputChannelArr().remove(num);
                App.getContext().getEqData().getInputChannelArr().add(num, chanelBean);
                break;
            case 10:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 24, channel.length() - 22)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 22, channel.length() - 18)));//音量
                chanelBean.setHighCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 18, channel.length() - 14)));//高切
                chanelBean.setLowCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 10)));//

                for (int i = 0; i < 15; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                    // chanelBean.getEqSegArr().add(eqSegmentBean);
                    Log.d("hdjghjdghfj11", i + "   Type=" + eqSegmentBean.getType() + "  频率=" + eqSegmentBean.getEqSegName() + "  q值=" + eqSegmentBean.getQvalue() + "   增益=  " + eqSegmentBean.getGain());
                }
                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getInputChannelArr().remove(num);
                App.getContext().getEqData().getInputChannelArr().add(num, chanelBean);
                break;
            case 11:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 24, channel.length() - 22)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 22, channel.length() - 18)));//音量
                chanelBean.setHighCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 18, channel.length() - 14)));//高切
                chanelBean.setLowCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 10)));//

                for (int i = 0; i < 15; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                    // chanelBean.getEqSegArr().add(eqSegmentBean);
                    Log.d("hdjghjdghfj12", i + "   Type=" + eqSegmentBean.getType() + "  频率=" + eqSegmentBean.getEqSegName() + "  q值=" + eqSegmentBean.getQvalue() + "   增益=  " + eqSegmentBean.getGain());
                }
                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getInputChannelArr().remove(num);
                App.getContext().getEqData().getInputChannelArr().add(num, chanelBean);
                break;
            case 12:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 24, channel.length() - 22)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 22, channel.length() - 18)));//音量
                chanelBean.setHighCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 18, channel.length() - 14)));//高切
                chanelBean.setLowCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 10)));//

                for (int i = 0; i < 15; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    //eqSegmentBean.setGain(3.90);//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                    // chanelBean.getEqSegArr().add(eqSegmentBean);
                    Log.d("hdjghjdghfj13", i + "   Type=" + eqSegmentBean.getType() + "  频率=" + eqSegmentBean.getEqSegName() + "  q值=" + eqSegmentBean.getQvalue() + "   增益=  " + eqSegmentBean.getGain());
                }
                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getInputChannelArr().remove(num);
                App.getContext().getEqData().getInputChannelArr().add(num, chanelBean);
                break;
            case 13:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 24, channel.length() - 22)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 22, channel.length() - 18)));//音量
                chanelBean.setHighCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 18, channel.length() - 14)));//高切
                chanelBean.setLowCut(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 10)));//
                for (int i = 0; i < 15; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                    // chanelBean.getEqSegArr().add(eqSegmentBean);
                    Log.d("hdjghjdghfj14", i + "   Type=" + eqSegmentBean.getType() + "  频率=" + eqSegmentBean.getEqSegName() + "  q值=" + eqSegmentBean.getQvalue() + "   增益=  " + eqSegmentBean.getGain());
                }
                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getInputChannelArr().remove(num);
                App.getContext().getEqData().getInputChannelArr().add(num, chanelBean);
                for (int i = 0; i < 2; i++) {

                    for (int k = 0; k < App.getContext().getEqData().getInputChannelArr().get(i).getEqSegArr().size(); k++) {

                        Log.d("hdjghjdghfj141", App.getContext().getEqData().getInputChannelArr().get(i).getEqSegArr().get(k).getEqSegName());

                    }
                }
                break;
        }
        //  发送互斥事件
        EventMessage eventMessage = new EventMessage(MessageReceiveType.MessageRecInput, "");
        EventBus.getDefault().postSticky(eventMessage);
    }

    public static void getData8Channel(String channel) {
        if(channel.length()<188){
            return;
        }
        // ChanelBean chanelBean = new ChanelBean();
        int num = ByteToString.strTo10(channel.substring(32, 34));//通道编号
        ChanelBean chanelBean = App.getContext().getEqData().getOutputChannelArr().get(num);
        ArrayList<EqSegmentBean> eqSegArr = chanelBean.getEqSegArr();
        switch (num) {
            case 0:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 12)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 12, channel.length() - 8)));//音量
                Log.d("fdgsdgsgsg" ,NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 12, channel.length() - 8)) + "==  " + NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 12)));
                for (int i = 0; i < 10; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                }

                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getOutputChannelArr().remove(num);
                App.getContext().getEqData().getOutputChannelArr().add(num, chanelBean);

                break;
            case 1:
                chanelBean.setChanelNum(num);
                chanelBean.setChanelNum(num);
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 12)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 12, channel.length() - 8)));//音量
                for (int i = 0; i < 10; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    //  eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44+14*i,48+14*i)));//增益
                    eqSegmentBean.setGain(3.7);//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                }

                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getOutputChannelArr().remove(num);
                App.getContext().getEqData().getOutputChannelArr().add(num, chanelBean);
                break;
            case 2:
                chanelBean.setChanelNum(num);
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 12)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 12, channel.length() - 8)));//音量
                for (int i = 0; i < 10; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                }

                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getOutputChannelArr().remove(num);
                App.getContext().getEqData().getOutputChannelArr().add(num, chanelBean);
                break;
            case 3:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 12)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 12, channel.length() - 8)));//音量
                for (int i = 0; i < 10; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                }

                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getOutputChannelArr().remove(num);
                App.getContext().getEqData().getOutputChannelArr().add(num, chanelBean);
                break;
            case 4:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 12)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 12, channel.length() - 8)));//音量
                for (int i = 0; i < 10; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                }

                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getOutputChannelArr().remove(num);
                App.getContext().getEqData().getOutputChannelArr().add(num, chanelBean);
                break;
            case 5:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 12)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 12, channel.length() - 8)));//音量
                for (int i = 0; i < 10; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                }

                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getOutputChannelArr().remove(num);
                App.getContext().getEqData().getOutputChannelArr().add(num, chanelBean);
                break;
            case 6:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 12)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 12, channel.length() - 8)));//音量
                for (int i = 0; i < 10; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                }

                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getOutputChannelArr().remove(num);
                App.getContext().getEqData().getOutputChannelArr().add(num, chanelBean);
                break;
            case 7:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 12)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 12, channel.length() - 8)));//音量
                for (int i = 0; i < 10; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                }

                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getOutputChannelArr().remove(num);
                App.getContext().getEqData().getOutputChannelArr().add(num, chanelBean);
                break;
            case 9:
                chanelBean.setChanelNum(num);
                chanelBean.setMute(NumberBaseConversionUtil.SixToTen(channel.substring(channel.length() - 14, channel.length() - 12)) == 0 ? false : true);//静音
                chanelBean.setVolume(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(channel.length() - 12, channel.length() - 8)));//音量
                for (int i = 0; i < 10; i++) {
                    EqSegmentBean eqSegmentBean = eqSegArr.get(i);
                    eqSegmentBean.setType(ByteToString.strTo10(channel.substring(34 + (14 * i), 36 + (14 * i))));//type值
                    eqSegmentBean.setEqSegName(ByteToString.strTo10(channel.substring(36 + 14 * i, 40 + 14 * i)) + "");//频率
                    eqSegmentBean.setQvalue(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(40 + 14 * i, 44 + 14 * i)));//q值
                    eqSegmentBean.setGain(NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44 + 14 * i, 48 + 14 * i)));//增益
                    eqSegArr.remove(i);
                    eqSegArr.add(i, eqSegmentBean);
                }

                chanelBean.setEqSegArr(eqSegArr);
                App.getContext().getEqData().getOutputChannelArr().remove(num);
                App.getContext().getEqData().getOutputChannelArr().add(num, chanelBean);
                break;
        }
        for (int i = 0; i < 2; i++) {

            for (int k = 0; k < App.getContext().getEqData().getOutputChannelArr().get(i).getEqSegArr().size(); k++) {

                Log.d("hdjghjdghfj149", App.getContext().getEqData().getOutputChannelArr().get(i).getEqSegArr().get(k).getEqSegName());

            }
        }
        //  发送互斥事件
        EventMessage eventMessage = new EventMessage(MessageReceiveType.MessageRecOutput, "");
        EventBus.getDefault().postSticky(eventMessage);


    }

    //输入通道参数回复
    public static void getDataInputParame(String channel) {
        String event = channel.substring(34, 36);
        switch (event) {
            case "01":
                Log.d("TAGevent回复", "通道=" + ByteToString.strTo10(channel.substring(32, 34)) + " 事件=" + channel.substring(34, 36) +
                        " 几段=" + ByteToString.strTo10(channel.substring(36, 38)) + " type=" + channel.substring(38, 40) + "  频率=" + ByteToString.strTo10(channel.substring(40, 44)) +
                        " q值=" + NumberBaseConversionUtil.SixToDecimalTen(channel.substring(44, 48)) + "  增益=" + NumberBaseConversionUtil.SixToDecimalTen(channel.substring(48, 52)));
                break;
            case "02":
                Log.d("TAGevent回复", "通道=" + ByteToString.strTo10(channel.substring(32, 34)) + " 事件=" + channel.substring(34, 36) +
                        " 静音状态=" + channel.substring(36, 38)+"  总数据"+channel);

                break;
            case "03":
                Log.d("TAGevent回复", channel + "通道=" + ByteToString.strTo10(channel.substring(32, 34)) + " 事件=" + channel.substring(34, 36) +
                        " 音量值=" + NumberBaseConversionUtil.SixToDecimalTen(channel.substring(36, 40))+"  总数据"+channel);

                break;
            case "04":
                Log.d("TAGevent回复", channel + "通道=" + ByteToString.strTo10(channel.substring(32, 34)) + " 事件=" + channel.substring(34, 36) +
                        "  高低切=" + channel.substring(36, 38) + "  频率=" + ByteToString.strTo10(channel.substring(38, 42))+"  总数据"+channel);

                break;

        }

    }
    //初始化远程开关值

    public static void setDataRemote(String matrix) {
        String order1 = matrix.substring(24, 28);//指令
        // String event = "指令=" + order1 + "   输入通道=" + ByteToString.strTo10((matrix.substring(32, 34))) + "   输出通道" + ByteToString.strTo10(matrix.substring(34, 36)) + "   type=" + ByteToString.strTo10(matrix.substring(36, 38)) + "   Gain=" + ByteToString.strTo10(matrix.substring(38, 42));
        Log.d("TAGevent回复=", "指令="+order1+"  远程本地？="+matrix.substring(34,36));
        if ("00".equals(matrix.substring(34,36))){
            App.getContext().getEqData().setMuteXSta(true);

        }else if ("01".equals(matrix.substring(34,36))){
            App.getContext().getEqData().setMuteXSta(false);

        }
        //  发送互斥事件
        EventMessage eventMessage = new EventMessage(MessageReceiveType.MessageRecMuteX, "");
        EventBus.getDefault().postSticky(eventMessage);
    }

    public static void getDataRemote(String matrix) {
        String order1 = matrix.substring(24, 28);//指令

       // String event = "指令=" + order1 + "   输入通道=" + ByteToString.strTo10((matrix.substring(32, 34))) + "   输出通道" + ByteToString.strTo10(matrix.substring(34, 36)) + "   type=" + ByteToString.strTo10(matrix.substring(36, 38)) + "   Gain=" + ByteToString.strTo10(matrix.substring(38, 42));
        Log.d("TAGevent回复=", "指令="+order1+"  远程本地？="+matrix.substring(34,36));

    }
    //输入通道参数回复
    public static void getDataMatrix(String matrix) {
        String order1 = matrix.substring(24, 28);//指令

        String event = "指令=" + order1 + "   输入通道=" + ByteToString.strTo10((matrix.substring(32, 34))) + "   输出通道" + ByteToString.strTo10(matrix.substring(34, 36)) + "   type=" + ByteToString.strTo10(matrix.substring(36, 38)) + "   Gain=" + ByteToString.strTo10(matrix.substring(38, 42));
        Log.d("DeviceAudioMatrixByGroupNew回复11=", event);
        Log.d("DeviceAudioMatrixByGroupNew回复22=", matrix);

    }
    //心跳数据
    public static void getHeartBeat(String heartBeatData) {
        String order1 = heartBeatData.substring(24, 28);//指令
        //设备编号和版本号
        String device_version= heartBeatData.substring(heartBeatData.length()-16, heartBeatData.length()-8);
        Hawk.put("device_version",device_version);
        Log.d("TAGevent回复=heartBeatData", "指令="+"  编号="+device_version);


    }

}
